package com.weaver.drools.business.execution.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.weaver.drools.business.execution.service.IQSelfEnemploycontact72Service;
import com.weaver.drools.common.dao.QSelfEnemploycontact72Dao;
import com.weaver.drools.common.entity.QSelfEnemploycontact72;
@Service
public class QSelfEnemploycontact72ServiceImpl implements IQSelfEnemploycontact72Service {

	@Autowired
	private QSelfEnemploycontact72Dao QSelfEnemploycontact72Dao;
	@Override
	public QSelfEnemploycontact72 findById(Long contactid) {
		// TODO Auto-generated method stub
		return QSelfEnemploycontact72Dao.findQSelfEnemploycontact72ByContactid(contactid);
	}

	@Override
	public void saveQSelfEnemploycontact72(QSelfEnemploycontact72 qSelfEnemploycontact72) {
		QSelfEnemploycontact72Dao.saveOrUpdate(qSelfEnemploycontact72);
	}

	@Override
	public void updateQSelfEnemploycontact72(QSelfEnemploycontact72 qSelfEnemploycontact72) {
		QSelfEnemploycontact72Dao.saveOrUpdate(qSelfEnemploycontact72);
	}

	@Override
	public void deleteById(Long contactid) {
		QSelfEnemploycontact72Dao.deleteById(contactid);

	}

	@Override
	public QSelfEnemploycontact72 findEntityByEmployeeId(Long employeeId) throws Exception {
		String hql="from QSelfEnemploycontact72"+
		" where isvalid=1 and isdeleted=0 and QSelfEmployee69.employeeid= "+employeeId;
		return  QSelfEnemploycontact72Dao.findEntity(hql);
	}

}
